import request from '@/utils/request'

// 查询体检单位管理列表
export function listBasecompany(query) {
  return request({
    url: '/physical/basecompany/list',
    method: 'get',
    params: query
  })
}
// soa导入
export function importCompany(SOANO) {
  return request({
    url: '/physical/basecompany/getBQCompany/'+ SOANO,
    method: 'get'
  })
}
// 危害类型
export function getallharmtype() {
  return request({
    url: 'basic/baseharm/info/allharmtypes',
    method: 'get'
  })
}
// 保存导入
export function saveImportCompany(data) {
  return request({
    url: '/physical/basecompany/saveBQCompany',
    method: 'post',
    data: data
  })
}
// 修改保存
export function editSaveBQCompany(data) {
  return request({
    url: '/physical/basecompany/editSaveBQCompany',
    method: 'post',
    data: data
  })
}
// 修改查询
export function editSearchBQCompany(data) {
  return request({
    url: '/physical/basecompany/editSearchBQCompany',
    method: 'post',
    data: data
  })
}

// 修改查询
export function editSearchBQCompanyById(id) {
  return request({
    url: '/physical/basecompany/editSearchBQCompany/' + id,
    method: 'post',
  })
}
// 查询体检单位管理详细
export function getBasecompany(id) {
  return request({
    url: '/physical/basecompany/' + id,
    method: 'get'
  })
}

// 新增体检单位管理
export function addBasecompany(data) {
  return request({
    url: '/physical/basecompany',
    method: 'post',
    data: data
  })
}

// 修改体检单位管理
export function updateBasecompany(data) {
  return request({
    url: '/physical/basecompany',
    method: 'put',
    data: data
  })
}

// 删除体检单位管理
export function delBasecompany(id) {
  return request({
    url: '/physical/basecompany/' + id,
    method: 'delete'
  })
}
